home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / FAQSYS18.ZIP / FAQS.DAT / SEGA1409.FAQ / text0000.txt < prev   
Encoding:
Text File  |  1995-12-12  |  71.3 KB  |  2,120 lines

  1. Sega Programming FAQ September 14, 1994, Sixth Edition
  2. =============================================================
  3.  
  4. This FAQ (Frequently Asked Questions) is about how to program
  5. the Sega Genesis and Mega Drive Video Games Systems.
  6.  
  7. This file IS Public Domain, and can be used by all.
  8. You may copy and post this file elsewhere. Share and enjoy.
  9.  
  10. If you want to add anything, especially game code or
  11. information on the hardware please E-mail me. My E-mail
  12. and real address are below and at the end of this FAQ.
  13.  
  14. Disclaimer : In no way I am indorsing any products, systems,
  15. etc. What I am doing is providing the information that I
  16. have found throughout internet and other network systems and
  17. reporting them here, with out reverse engineering. All
  18. information is reported as is- I will not accept any
  19. responsibility if you fry your system trying something out.
  20.  
  21. All copyrights are owned by their respective owners, no
  22. infringements intended.
  23.  
  24. Henry Rieke
  25. <U6c16@Wvnvm.Wvnet.Edu>
  26.  
  27. US Mail:
  28.  
  29. Henry Rieke
  30. Attn: Sega FAQ
  31. 161 Poplar Dr
  32. Morgantown, Wv 26505-2340
  33.  
  34. =============================================================
  35.  
  36. 0.1 Changes, Updates and Coming Soon
  37.  
  38. 1) Graphic, Video, and processor maps have been added. Major stuff here.
  39. In fact, enough to being programming your own games.
  40.  
  41. 2) With a sad note, I have to report that the Sega listserver
  42. has died a death of low usage, and long with that went the site
  43. on Busop. I am in the process of locating a new site(s), and
  44. will make the apporte posts when I do. If you have a site that you
  45. admin, and are willing to donate some disk space, let me know please.
  46. The good news of this is that these new sites will be mirrored so you
  47. could find the files quicker. I am also working on a WWW version of this
  48. document, and if you know of a site to put it, let me know.
  49.  
  50. 3) Coding for the four player tap from Electonic Arts has been added.
  51. Does anyone have the code for the multi-tap from Sega, and how it works?
  52.  
  53. 4) I am now beginning to work on a topic header on languages that
  54. you can program in for the Sega and Sega CD ROM. If you have any
  55. direct information (compiler, how to compile, etc) let me know so
  56. I can include it.
  57.  
  58. =============================================================
  59.  
  60. 1.0 Questions
  61.  
  62. Q) What are the differences between Mega Drive and Genesis?
  63.    What are the differences between Mega CD and Sega CD?
  64.  
  65. A) Physically, on the outside, the only difference is the
  66.    plastic case, the cartridge shape is slightly different on
  67.    the American version, smaller in size. On the inside there
  68.    are four jumpers labeled J1 though J4. J1 and J2 is the
  69.    language switch, between English and Japanese, J3 and J4
  70.    select the output between PAL and NTSC. You can build a
  71.    switch that can allow you to select between these options.
  72.    The diagram is included in this document (Chapter 5.0,
  73.    called "Language Switch"). The reason for the language
  74.    switch is to keep people from getting the game before it
  75.    is officially released elsewhere in the world. The newer
  76.    Sega Machines do not have the jumpers, and hence you can
  77.    not build a switch (as of yet).
  78.  
  79.    The difference between Mega CD and Sega CD are internal.
  80.    In side the machine there is a ROM BIOS chip which is changed
  81.    for different markets. Sega has a version of the BIOS which
  82.    will play any system's games, but this is for Game developing
  83.    and testing. There is a device called Pro-CDX which will allow
  84.    you to by-pass the lockout and play any country's games.
  85.  
  86. Q) Where to find files on the Sega Genesis/Mega Drive
  87.    hardware?
  88.  
  89. A) You can find the files on the Sega hardware from one of
  90.    the following FTP sites. A brief section describing memory
  91.    and cartridge ROMs are included in this FAQ. The author
  92.    Rick McTeague, is from Louisville and the most current copy
  93.    can be found there first.
  94.  
  95. FTP ftp.spd.louisville.edu
  96.     pub\sega\hardware.txt
  97.  
  98. FTP sunsite.unc.edu
  99.     pub\micro\games\sega\faqs\incoming\hardware.txt
  100.     It's in there. I'm not sure of the exact location.
  101.     There are also many other files here as well as a few
  102.     68000 ASM. <-- yet to be moved and posted. Working on
  103.     it.
  104.  
  105.  
  106. Q) What does it take to program the Genesis?
  107.  
  108. A) Development kits can be bought from many companies, a list
  109.    is included in the section called "Companies". These kits
  110.    require an IBM or Amiga computer to compile the code,
  111.    which is usually assembly, but can be in C as long as it
  112.    can be compiled into 68000 binary. SEGA's own kit is extremely
  113.    expensive and they are rumored to have slow response time
  114.    to answer questions. The price of the kits cost from $1000
  115.    to $4000.
  116.  
  117. Q) Is IBM or Amiga the only two platforms for game
  118.    development?
  119.  
  120. A) No. The Apple Macintosh does have a system, which does allow
  121.    you to compile games, but it is a do-it yourself job (See below
  122.    for the whole scope). There also is a system for the Apple IIgs,
  123.    called Sluggo from Parsons Engineering. As for the Mac, if you
  124.    know, please pass it on. It is rumored that Electronic Arts uses
  125.    a priority system on the Macintosh for porting the games.
  126.  
  127. -- This information comes from Landon Dyer <landon@apple.com>,
  128.  
  129. -- You can generate 68K code for the Sega "trivially" with the
  130.    C compiler and assembler in the Macintosh programmer's workshop
  131.    (MPW). You'll need to hack up some transfer utilities, but this
  132.    is not really hard. You can wire-wrap a ROMulator, or buy one;
  133.    there are a bunch on the market that should work just fine.
  134.    I had a ROMulator and a debugger up and running in about a
  135.    week, working evenings. (Ed note: ROMular information can be found
  136.    at the FTP sites)
  137.  
  138. Q) How do I program the SEGA CD Rom?
  139.  
  140. A) I am beginning to understand how to program this device,
  141.    but more information is needed, so if you have any, please
  142.    pass it along to me so I can include it in the next update.
  143.    Look under Hardware 2.1, Sega CD for more information about
  144.    the unit.
  145.  
  146. Q) What is Saturn, and how do I program that?
  147.  
  148. A) Saturn is Sega's next generation game machine, which
  149.    is based on Sega's S-1 /S-2 arcade Machine's motherboard.
  150.    Rumor has it that it will allow programming in C as
  151.    well as Assembly, and porting of arcade games that are
  152.    based on the S-1 and S-2 boards will take only a week.
  153.    There is good news and bad news as well.
  154.    Good news, Microsoft will be writing the OS.
  155.    Bad new, Microsoft will be writing the OS.
  156.  
  157. Q) What else is there on Internet?
  158.  
  159. A) Well there is the Sega Programming forum, which you can
  160.    join by subscribing to it with this command:
  161.    Send a message to Listserv@Busop.Cit.Wayne.Edu with the
  162.    first line reading SUBSCRIBE MEGADEV
  163.    To unsubscribe, do the same above, except the first line
  164.    should read UNSUBSCRIBE MEGADEV
  165.  
  166.    There is also Rec.Games.Video.Programmer and
  167.    Rec.Games.Video.Sega where you can ask your questions.
  168.  
  169.    There are also files on how to use the old SEGA 3D glasses
  170.    with your IBM compatible computer which can be found all
  171.    over the place (including the above FTP sites).
  172.  
  173. =============================================================
  174.  
  175. 2.0 Hardware : This is the inner workings of the Sega system
  176. ROM and Memory. For a better understanding Sega Hardware I
  177. suggest reading Hardware.txt. An up-to-date version of this
  178. file can be gotten by anonymous ftp from Ftp.spd.louisville.edu,
  179. in the file "Pub/sega/Hardware.txt".
  180.  
  181. Genesis - this information comes from Rick McTeague.
  182.  
  183. Sega Genesis Hardware Internals - Revised: 04/07/1993
  184.  
  185. Please send corrections or comments to:
  186.  
  187.    Rick McTeague
  188.    Sysrick@starbase.spd.louisville.edu
  189.  
  190. Disclaimers:
  191.  
  192. The following information was extracted without the use of
  193. official information from Sega Enterprises, Ltd. I therefore
  194. offer no warranty on the correctness of this information.
  195. Use it at your own risk.
  196.  
  197. This information was gathered as a personal project, and is
  198. not the responsibility of my employer.
  199.  
  200. Different versions of the Genesis exist, so I won't suggest
  201. that any of this information is right for anybody's Genesis
  202. but my own.
  203.  
  204. Sega, Genesis, Sonic the Hedgehog, and Ecco the Dolphin are
  205. trademarks of Sega Enterprises, Ltd. Other trademarks are the
  206. property of their respective companies.
  207.  
  208.  
  209. The Cartridge ROM
  210. -----------------
  211.  
  212. As others on the net have observed, a standard Genesis
  213. cartridge is nothing more than a small printed circuit board
  214. with a ROM on it. There are some cartridges which have
  215. battery-backed RAM for saving high scores, configurations,
  216. etc., but I haven't seen these, so I don't know about them.
  217. If you know of a particular cartridge that has RAM, let me
  218. know so I can go rent one and take it apart (shhhh!) to see
  219. what's in it.
  220.  
  221. A cartridge contains a word-wide (16 bit) ROM with up to 2
  222. Meg words (4 Mbytes). This is based on the signal !C_CE, which
  223. is used as the cartridge ROM's chip enable on the cartridges
  224. I've looked at, and which is active at addresses $000000-$3fffff.
  225.  
  226. It may be possible to have more than 4 Mbyte cartridges; if
  227. so, either they ignore the !C_CE line and do their own
  228. address decoding, or there's a register somewhere in the
  229. Genesis which changes the default address decoding scheme for
  230. !_CE.
  231.  
  232. Note that cartridges are advertised as being "8 Meg"; as far
  233. as I know, is 8 Meg _bits_, not bytes. 1 Mbyte is still
  234. pretty impressive for a game machine.
  235.  
  236. SONIC uses a 40-pin 256Kx16 (512Kx8) ROM in word mode.
  237.  
  238. Ecco the Dolphin uses a 42-pin 512Kx16 (1024Kx8) ROM in word
  239. mode. This one confused me because I'd never seen a 42-pin
  240. DIP before, so I thought it was 40 pins. No wonder the
  241. signals didn't look right...
  242.  
  243. Putting together a little bit of information from a Sharp
  244. data sheet for a 512 Kword ROM with a bit of conjecture based
  245. on the Sonic and Ecco cartridges, this is what I can come up
  246. with for pinouts:
  247.  
  248.          Sonic                              Ecco
  249.       (256 Kword)                       (512 Kword)
  250.  
  251.                                           ----u----
  252.          ----u----               A18    1=|       |=42   VCC?
  253. A17    1=|       |=40   A 8      A17    2=|       |=41   A 8
  254. A 7    2=|       |=39   A 9      A 7    3=|       |=40   A 9
  255. A 6    3=|       |=38   A10      A 6    4=|       |=39   A10
  256. A 5    4=|       |=37   A11      A 5    5=|       |=38   A11
  257. A 4    5=|       |=36   A12      A 4    6=|       |=37   A12
  258. A 3    6=|       |=35   A13      A 3    7=|       |=36   A13
  259. A 2    7=|       |=34   A14      A 2    8=|       |=35   A14
  260. A 1    8=|       |=33   A15      A 1    9=|       |=34   A15
  261. A 0    9=|       |=32   A16      A 0   10=|       |=33   A16
  262. !CE   10=|       |=31   !BYTE    !CE   11=|       |=32   !BYTE
  263. GND   11=|       |=30   GND      GND   12=|       |=31   GND
  264. !OE   12=|       |=29   D15      !OE   13=|       |=30   D15
  265. D 0   13=|       |=28   D 7      D 0   14=|       |=29   D 7
  266. D 8   14=|       |=27   D14      D 8   15=|       |=28   D14
  267. D 1   15=|       |=26   D 6      D 1   16=|       |=27   D 6
  268. D 9   16=|       |=25   D13      D 9   17=|       |=26   D13
  269. D 2   17=|       |=24   D 5      D 2   18=|       |=25   D 5
  270. D10   18=|       |=23   D12      D10   19=|       |=24   D12
  271. D 3   19=|       |=22   D 4      D 3   20=|       |=23   D 4
  272. D11   20=|       |=21   VCC      D11   21=|       |=22   VCC
  273.          ---------                        ---------
  274.  
  275. Note that the address line numbering is different than that
  276. of the 68000; line A0 of the ROM is really connected to the
  277. 68000's A1. This is because of the way the 68000 handles
  278. even/odd byte addressing using !UDS and !LDS.
  279.  
  280. The !BYTE line is held high. This puts the ROM chip into
  281. "word" mode, where data is accessed 16 bits at a time.
  282.  
  283. The convenient correspondence between ROM and 68000 data and
  284. address lines (ROM D0 = 68K D0, ROM D1 = 68K D1, etc..., and
  285. ROM A0 = 68K A1,  ROM A1 = 68K A2, etc...) may not exist in
  286. all cartridge designs. This is sometimes difficult to
  287. visualize, but keep in mind that the ROM doesn't care whether
  288. its D0 is really D0, or if its A3 is really A3, etc. As long
  289. as each data line is used as the same D## line for both
  290. programming and reading, and each address line is used as the
  291. same A## for both programming and reading, the ROM will
  292. function properly and the 68000 will see the right
  293. instructions. Think about it...
  294.  
  295. Why bring this up? If you remove the ROM from the cartridge
  296. PCB and try to read it with a EPROM programmer, there may be
  297. situations where you won't see valid 68000 instructions, or
  298. things won't be in the right place... Assuming your
  299. programmer isn't messed up, this would be because the address
  300. and data lines on the ROM aren't assigned the way you'd
  301. expect.
  302.  
  303. Why would someone make a cartridge like this? To make your
  304. life difficult, if you're wanting to hack their ROMs, or to
  305. make their life easy, by making the cartridge PCB easier to
  306. design.
  307.  
  308. The easiest way to avoid this potential problem is to build
  309. an adapter from your programmer's EPROM socket to an edge
  310. card connector into which you plug the cartridge. This is a
  311. bit safer, too, so you don't have to remove the ROM from the
  312. cartridge (or even open it up).
  313.  
  314. The Memory Map
  315. --------------
  316.  
  317. $000000 $3fffff Cartridge ROM, when enabled by cartridge
  318. control register and !CART_IN.
  319.  
  320. $000000 $0007ff Internal OS ROM, when enabled by cartridge
  321. control register and !CART_IN.
  322.  
  323. $ff0000 $ffffff 64Kbytes scratchpad RAM
  324. Partially decoded; RAM actually appears repeated between
  325. $e00000 through $ffffff.
  326.  
  327. $a14101 cartridge control register
  328. bit 0 = 0: cartridge disabled, OS ROM enabled
  329. bit 0 = 1: cartridge enabled, OS ROM disabled
  330.  
  331. $a00000 $a????? Unknown. Audio? Controller I/O?
  332.  
  333. $c00000 $c????? Video display controller registers
  334.  
  335. The OS puts the top of its stack at $ffff00, and defines a
  336. "user stack pointer" at $000000 (building down through the
  337. top of RAM memory).
  338.  
  339. The Z80 processor is used for sound and has 8Kbytes of RAM.
  340. I don't know anything about how the Z80 does its work, as I
  341. haven't looked.
  342.  
  343. Acknowledgements
  344. ----------------
  345. Thanks to:
  346.  
  347. dt93tn@pt.hk-r.se (Tore Nestenius) for info on older Genesis
  348. systems.
  349.  
  350. lewism@rpi.edu (Michael Lewis) for info on the Sony CXA1145
  351. and Samsung KM6264 chips.
  352.  
  353. crs@crs-sys.uucp (Chris Gregors) for posting a version of the
  354. Genesis cartridge port pinouts.
  355.  
  356. merlyn@digibd.com (Brian Westley) for Game Genie information
  357. and decoder program.
  358. ------------------------------------------------------------
  359.  
  360. Brief technical description of the Genesis:
  361.  
  362. ---
  363. The genesis graphics hardware consists of 2 scrollable planes.
  364. Each plane is made up of tiles. Each tile is an 8x8 pixel square
  365. with 4 bits per pixel. Each pixel can thus have 16 colors. Each
  366. tile can use 1 of 4 color tables, so on screen you can get 64
  367. colors at once, but only 16 in any specific tile. Tiles require
  368. 32 bytes. There is 64K of graphics memory. This would allow
  369. for 2048 unique tiles if memory were used for nothing else.
  370.  
  371. Each plane can be scrolled independently in various ways.
  372. Planes consist of tables of words, where each word describes a
  373. tile. The word contains 11 bits for describing which tile, 2 bits
  374. for flip x and flip y, 2 bits for the selection of the color table,
  375. and 1 bit for a depth selector. Sprites are composed of tiles also.
  376. A sprite can be up to 4 tiles wide by four tiles high. Since each
  377. tile is 8x8, this means sprites can be anywhere from 8x8 pixels to
  378. 32x32 pixels. There can be 80 sprites on screen at one time. On a
  379. scan line you can have 10 32 pixel wide sprites or 20 16 pixel wide
  380. sprites. Each sprite can only have 16 colors but they are out of the
  381. 4 different color tables. Color 0=transparent.
  382.  
  383. Colors are 3 bits for each gun, so 512 colors are possible.
  384.  
  385. There is a memory copier that is in hardware. This does fast copies from
  386. the 68000 ram into the graphics ram.
  387.  
  388. The 68000 runs at about 8 mhz. It has 64K of memory devoted to it. The
  389. ROM cartridge appears at 0.
  390.  
  391. The Z80 has 8K of ram. The 68000 can download programs to the z80 and
  392. let them go. The z80 can access the graphics chips or the sound synth
  393. chips but usually those things are controlled by the 68000.
  394.  
  395. The sound chips consist of a Yamaha synthesis chip and a TI programmable
  396. sound generator. The PSG has 3 square wave tones and 1 white noise tone.
  397. Each tone/noise channel can have its own frequency and volume.
  398.  
  399. The Yamaha chips are based on FM synthesis. There are 6 voices with 4
  400. operators each. The chips are similiar to those used in the Yamaha
  401. DX27 and DX100 synthesizers. By setting up registers a rich variety of
  402. sounds can be created.
  403.  
  404. ------------------------------------------------------------
  405.  
  406. 2.1 Sega CD Rom. The following information came from
  407. Leyland@island.COM (Robert Leyland), who was a programmer for the
  408. most excellent Sega CD Rom game - Flying Aces. (Plug!Plug!
  409. Plug!Plug!Plug!Plug!)
  410.  
  411. -- The Sega CD is ISO 9660 format, with proprietary start-up code
  412. that must be licensed from SEGA in order to work. For programming
  413. you use two PC's, one connected to a debugging system and the other
  414. emulated an CD-ROM drive.
  415. The trickiest part of programming the Sega CD/Genesis combo is
  416. keeping the two CPU's synchronized. For some reason the single
  417. hardest thing to do with any computer is get it to talk reliably
  418. with another computer.
  419. --
  420.  
  421.  
  422. ------------------------------------------------------------
  423.  
  424. 2.2 Joystick - 3 button version - Could some please post a 6
  425. button version?
  426.  
  427. By: nhowland@matt.ksu.ksu.edu (Neal Howland) for information
  428. on the Joystick port.
  429.  
  430. First some background info:  The chip inside the controller
  431. is a 74HC157.  This is a high-speed cmos quad 2-line to
  432. 1-line multiplexer. Basically how this works is there are two
  433. inputs ( A and B ) for every output ( Y ).  There are four
  434. groups like this.  There is one select signal for the whole
  435. chip.  When the select signal is low, the output ( Y ) is the
  436. same as input A.  When the select signal is high, the output
  437. Y is the same as input B.  The pinout for the chip is as
  438. follows:
  439.  
  440.    Pin 1 - SelectPin 16 - Vcc (+5V)
  441.    Pin 2 - 1APin 15 - G (? must be low)
  442.    Pin 3 - 1BPin 14 - 4A
  443.    Pin 4 - 1YPin 13 - 4B
  444.    Pin 5 - 2APin 12 - 4Y
  445.    Pin 6 - 2BPin 11 - 3A
  446.    Pin 7 - 2YPin 10 - 3B
  447.    Pin 8 - GndPin 9 - 3Y
  448.  
  449.  
  450. All the controls are done with switches.  Up is a switch,
  451. Down is a switch, etc. Now, I will be referring to the output
  452. of these switches later on. What I mean is that the output is
  453. usually high, that is when the switch isn't pressed.
  454.  
  455. When the button is pushed, the output goes low.  This is
  456. accomplished by connecting the output to +5V through a 10k
  457. resistor. The button is then attached between the output and
  458. ground. It looks like this:
  459.  
  460.      +5V -----/\/\/------+--------- Output
  461.                10k       |
  462.                          |
  463.                 /        |
  464.    Ground -----/  -------+
  465.               button
  466.               (normally open)
  467.  
  468. For all of those who could actually decipher the above
  469. schematic, congratulations!
  470.  
  471.  
  472. I will now run down what lines from the plug are connected to
  473. what. The line numbers are determined as follows, looking
  474. straight at the plug on the front of the Genesis the numbers
  475. are:
  476.  
  477.    1 2 3 4 5
  478.     6 7 8 9
  479.  
  480.   (For those of you who buy a joystick cable from radio shack
  481. the pin #'s to wire colors are as follows: 1-white 2-blue
  482. 3-green 4-brown 5-yellow 6-orange 7-red 8-black 9-gray )
  483.  
  484. anyway, line connections:
  485.  
  486. Line 1 - Up output      These are the only two direct
  487. Line 2 - Down output             connections
  488.  
  489. Line 3 - Pin 4 of the chip output 1Y
  490. Line 4 - Pin 7 of the chip output 2Y
  491.  
  492. Line 5 - This line carries in +5V. It is connected to the
  493.          +5V bus line.
  494.  
  495. Line 6 - Pin 9 of the chip output 3Y
  496. line 7 - Pin 1 of the chip this carries in a select signal
  497.          from the Genesis. This is a signal which varies
  498.          rapidly and controls which input goes through the
  499.          output.
  500.  
  501. Line 8 - Ground  This is connected to the Ground bus line.
  502. Line 9 - Pin 12 of the chip output 4Y
  503.  
  504. Now for the chips pin connections:
  505.  
  506. Pin 1 - Line 7    (select)
  507. Pin 2 - Ground    (1A)  Don't ask me why they do this. Maybe
  508. Pin 3 - Left      (1B)  future expansion
  509. Pin 4 - Line 3    (1Y)
  510. Pin 5 - Ground    (2A)  Again, possibly future expansion
  511. Pin 6 - Right     (2B)
  512. Pin 7 - Line 4    (2Y)
  513. Pin 8 - Ground    (GND)
  514. Pin 9 - Line 6    (3Y)
  515. Pin 10 - Button B (3B)
  516. Pin 11 - Button A (3A)
  517. Pin 12 - Line 9   (4Y)
  518. Pin 13 - Button C (4B)
  519. Pin 14 - Start    (4A)
  520. Pin 15 - Ground   (G)   This must be connected to ground
  521. Pin 16 - +5V      (Vcc) Power source for the chip
  522.  
  523. Anyway that's all the info needed to build your own joystick.
  524.  
  525. Now as an added bonus, additional information!
  526.  
  527. A simple source for a joystick cable is the Radio Shack
  528. joystick extension cable. It is around $5 and is 10 ft. long.
  529. Just snip off the connector that won't plug into the Genesis,
  530. strip the wires back, and use the color pinout list I gave
  531. above.
  532.  
  533. I went to my local arcade game repair company today and
  534. purchased the supplies I needed.  They were much cheaper than
  535. I expected.  Things you would need to buy from them would be:
  536.  
  537.    an 8-way joystick     this ran me $15
  538.         3 buttons             $2.50 apiece
  539.  
  540. I only bought three buttons because I am going to use a Radio
  541. Shack push button switch for my start button. You can purchase
  542. 4 arcade game buttons if you wish.
  543.  
  544. Interesting ideas for extras on the joystick:
  545.  
  546. 1.  Autofire can be achieved with a simple 555 timer circuit.
  547.  
  548.     For anyone wanting a challenge it should be possible to
  549. build a digital autofire using a divide-by-n counter with the
  550. select signal as clock input.
  551.  
  552. 2.  Slow down mode is just autofire for the start button.
  553.  
  554. =============================================================
  555.  
  556. 3.0 Companies - these companies produce the hardware that is
  557. required to write games for the Genesis. The original
  558. document came from: Scott Golby <sgolby@st.nepean.uws.edu.au>
  559.  
  560.    Hi Everyone,
  561.  
  562.    Here is the current list of info I have about the Sega.
  563.  
  564.    I have had about 10 replies so far asking to pass my
  565. info on.  If people want I will pass their EMail address on
  566. to everyone else so we can work as a group.  Drop me a line
  567. if you want to be added to the 'group' list.
  568.  
  569. *****    <----- Five astrict like this means info from
  570. different people
  571.  
  572.    Sega Genesis Developer Resources
  573.  
  574.    Dan Chang April 18, 1993
  575.  
  576. Sega of America Inc
  577. Consumer Products Division
  578. 125 Shoreway Road
  579. San Carlos, California, 94070
  580. Tel : (415) 802-4400
  581. Fax : (415) 802-4458
  582.  
  583. Stuart Kosoy is the person to contact at Sega of America
  584. at (415)802-4407.
  585.  
  586. Products : Detailed SEGA Genesis technical information.  GEMS
  587. SEGA music development package.
  588. Solution : Music and Sound effects package for the Sega. SOA
  589. can provide detailed information on programming the Genesis;
  590. however they will want to know more about your company first.
  591.  
  592. Western Technologies, Inc.
  593. 12057 Jefferson Blvd
  594. Culver City, California, 90230
  595. Tel : (310) 821-7880
  596. Fax : (310) 306-1739
  597.  
  598. Products : SegaDev Card. PC-Hosted Genesis development
  599. hardware, which includes SEGADEV.EXE, a Windows-hosted
  600. source-level debugger, and SEGALOAD.EXE, a PC_hosted 68000
  601. object code downloader.
  602. Solutions : SEGA Genesis Hardware, WT recommends Sierra
  603. Systems 68000 Assembler.
  604.  
  605.  
  606. Sierra Systems
  607. 6728 Evergreen Ave
  608. Oakland California 94611
  609. Tel : (510) 339-8200  or (800) 776 4888
  610. Fax : (510) 339 3844
  611.  
  612. Products : PC-hosted Sierra C cross-compiler, which included
  613. 68000 C compiler, assembler, linker.
  614.  
  615. Contact person at Sierra Systems is Larry Rosenthal
  616. E-Mail Sierra@netcom.com
  617.  
  618.  
  619. Motorola, Literature Dist
  620.  
  621. This entry basically has a list of 68000 reference and
  622. programming books.
  623.  
  624.  
  625. Echidna
  626. 1101 W Stevens Ave, Suite 232
  627. Santa Ana California 92707
  628. Tel : (714) 545-2662
  629. Fax : (714) 545-3705
  630.  
  631. Products : tUME - the Universal Map Editor. PC-Hosted tool to
  632. edit tile-maps.
  633. Solutions : Saves time in designing game maps and placing
  634. level information. Downloads maps to Western Techs SegaDev
  635. card.
  636.  
  637. A tUME demo can be found by FTP busop.cit.wanye.edu under
  638. /pub/megadev/incoming/tumedemo.zip
  639. Well worth a look.
  640.  
  641.  
  642. Cross Products Limited
  643. 23 The Calls
  644. Leeds LS2 7EH, England
  645. Tel 0532 429814
  646. Fax 0532 426163   (dial 011 44 532 426163 from USA)
  647.  
  648. Product : SNASM68K : PC-Hosted SEGA Genesis development
  649. system, which includes a 68000 assembler, linker, debugger.
  650.  
  651.  
  652. Parsons Engineering
  653. Imhurst Ave
  654. Covina California 91724
  655. Tel (818) 966 5538
  656.  
  657. Products : PC/Apple IIgs hosted Sluggo Genesis development
  658. hardware.
  659.  
  660.  
  661. Advantech
  662. 1333 E.9400 South, Suite 160
  663. Sandy Utah, 84092
  664. Tel : (801) 572-5410
  665. Fax : (810) 572-5674
  666.  
  667. Products : blank SEGA Genesis cartridge PC boards, blank
  668. EPROMS.
  669.  
  670. *****
  671. Genesis Development System Frequently Asked Questions
  672.  
  673. Q:What is the Genesis Development System?
  674.  
  675. A:The GDS is a cross development system that lets you develop games and other
  676.   software to run on the Sega Genesis. The system consists of a 4 inch by 8
  677.   inch printed circuit board that plugs in the cartridge slot of the Genesis,
  678.   and has a cable going to the parallel port of the host computer. A complete
  679.   software set is included consisting of an integrated editor/assembler, a
  680.   stand alone assembler, a symbolic debugger, a music and sound effect editor,
  681.   a utility to break standard 16 color IFF images into tiles to be downloaded
  682.   to the Sega, a utility to capture screen graphics on the Genesis, a
  683.   utility to send an LBM image to the Genesis for preview, a linker for
  684.   joining multiple object modules, and several example files.
  685.  
  686. Q:Does it come with any source files?
  687.  
  688. A:You get source to the music editor, source to a Z80 program to run on the
  689.   genesis to interpret the music files, source to a demo program that plays
  690.   music and has sprites bouncing around behind the Sega logo, source to the
  691.   download utilities. Complete source is provided on communicating between
  692.   the host machine and the Genesis.
  693.  
  694. Q:How much memory does it have on the board?
  695.  
  696. A:It comes with 2.25 or 4.25 megabytes of memory. Older versions had 1.25
  697.   megabytes. 256K is reserved for use by the debugger for variable
  698.   storage and symbols.
  699.  
  700. Q:Can you program CD games with it?
  701.  
  702. A:It is not specifically designed for a CD. You could program as if you're
  703.   creating a cartridge then modify the code later to make it work on the
  704.   CD. I provide no information on the Genesis CDROM drive. I don't own one
  705.   myself. The Genesis CDROM market is perhaps 10% of the cartridge market.
  706.  
  707. Q:Does it include technical specifications for the Genesis?
  708.  
  709. A:Yes, it comes with descriptions of the memory map, graphics registers, the
  710.   Z80's functions, reading the joysticks, sprites, scrolling, tiles, the
  711.   DMA copier, the audio chips-in short everything required to program the
  712.   genesis. Also provided are several working demos with source.
  713.  
  714. Q:Is this proprietary information stolen from Sega?
  715.  
  716. A:No, the information on the Genesis came from reverse engineering it,
  717.   completely independent of Sega. There are no copyright violations in the
  718.   purchase or sale of this development system, nor is there anything illegal
  719.   about any use of it.
  720.  
  721. Q:How does it work?
  722.  
  723. A:The board has ROMs on it which contain the monitor and debugger that runs
  724.   on the Genesis. When the Genesis is reset, the ROMs take over and wait for
  725.   commands to come from the host machine-commands like download bytes, send
  726.   bytes back, set up registers, define a symbol, or enter the interactive
  727.   debugger. When in the interactive debugger the host machine acts as a
  728.   terminal, and characters are sent over the cable. Full 68000 debugging
  729.   is possible, including disassembly, single step, register view and modify,
  730.   breakpoints, expression evaluation, memory view, modify, search and copy,
  731.   symbol definition, memory compare. There is also a z80 disassembler built
  732.   in.
  733.  
  734. Q:What about the assembler?
  735.  
  736. A:The assembler is a full macro 68000 assembler, and includes the full 8080
  737.   and parts of the Z80 instruction set. It generates symbol table information
  738.   that can be downloaded to the Genesis to allow for symbolic debugging.
  739.   On a 66 Mhz DX2 the assembler is about 550,000 lines/minute. There is also
  740.   a linker which combines multiple object files.
  741.  
  742. Q:Can I program in C?
  743.  
  744. A:There is no C compiler included in the package. In the future there
  745.   may be.
  746.  
  747. Q:How do I make artwork? Is there a sprite editor?
  748.  
  749. A:Originally I planned on including a simple graphic editor, but I found that
  750.   no one used it-instead they used Dpaint. The best way is to use dpaint to
  751.   create graphics in lo-res 16 color mode, then to use the utility I provide
  752.   to convert them to raw data to be sent to the Sega. Animation can be done
  753.   within Dpaint. Unfortunately there is no editor for manipulating giant
  754.   figures made out of sprites, but in principle it would be possible to do. So
  755.   probably you will use dpaint or some other painting program to create the
  756.   artwork.
  757.  
  758. A:Can you backup existing cartridges like the game backup systems?
  759.  
  760. Q:The system is intended for game development. However if you were able
  761.   to obtain ROM images, they can be downloaded just like original code.
  762.   When running a ROM under the system, you can tinker with memory, modify
  763.   gameplay, add lives, etc. You can do all the normal debugging functions,
  764.   like single step, breakpoints, etc, to see how the program is working.
  765.   In the future (Mid March, 1994) a reader will be available for $100 which
  766.   will let you read out the contents of your cartridges.
  767.  
  768. Q:How fast are downloads?
  769.  
  770. A:The current board has transfer rates of up to 105K bytes per second. Older
  771.   versions of the board had a 49K bytes per second transfer rate.
  772.  
  773. Q:What host machines is this available on?
  774.  
  775. A:Currently the complete system is available on the IBM PC. There is also
  776.   an Amiga version but it has fewer features than the PC version.
  777.  
  778. Q:Why should I buy your system and not go through Sega?
  779.  
  780. A:My system is better and cheaper than those provided by Sega. I sell to
  781.   anyone. Sega sells only to large companies. I require no non-disclosure
  782.   statements to be signed. Sega requires you to sign extensive non-disclosure
  783.   statements, and you essentially have to be subservient to them forever.
  784.   If you buy my system you immediately have the ability to create software
  785.   for the Genesis. If you create a game, you can then sell it outrifht or
  786.   attempt to publish it yourself. You wouldn't have to pay Sega any of their
  787.   rediculous royalties on each unit, regardless of how well your program
  788.   sells.
  789.  
  790. Q:How long has this system been available?
  791.  
  792. A:It first became available in April 1991. The 2 and 4 megabyte versions
  793.   first became available in February, 1994.
  794.  
  795. Q:How many have already been sold?
  796.  
  797. A:I've sold around 30 units so far.
  798.  
  799. Q:How much does it cost?
  800.  
  801. A:For the 4 megabyte version the cost is $1600. For the 2 megabyte version
  802.   the cost is $1500. For the duration of March, 1994 there is a special
  803.   introductory price of $1000 for the 2 megabyte version and $1100 for the
  804.   4 megabyte version. After March, 1994 the price will be raised by $500.
  805.  
  806. Q:Will it be ported to other platforms?
  807.  
  808. A:There are no plans to port the software to any other platforms.
  809.  
  810. Q:What about technical support? How about software upgrades?
  811.  
  812. A:You can send me email and I will answer questions and help solve your
  813.   problems. If I'm home you can call me. Concerning software support: I want
  814.   you to be happy with this. If you want some program written, and it seems
  815.   like a good idea, chances are I'll do it for free and include it with the
  816.   system. Currently if the software seems sparse it's because no one has
  817.   complained so I guess I include enough. There's no point in writing
  818.   software if it isn't going to be used. In any case software upgrades are
  819.   free unless it's some major upgrade like including a C compiler-I don't
  820.   believe in selling something for hundreds of dollars then nickel and diming
  821.   you on upgrades. EPROM upgrades are free if you send back your originals.
  822.  
  823. Q:Do we need to pay you any royalty on games developed with the system?
  824.  
  825. A:No. Once you bought the system you can do anything you want with it-except
  826.   copy it and sell it yourself...
  827.  
  828. Q:How can I contact you?
  829.  
  830. A:Send me mail, email or call.
  831.   818-584-0357
  832.   INTERNET: dash@netcom.com
  833.   David Ashley
  834.   395 Sierra Madre Villa
  835.   Pasadena, CA 91107
  836.   USA
  837.  
  838. *****
  839.  
  840. =============================================================
  841.  
  842. 4.0 Code samples. The following code was graciously given to
  843. me by David Ashley, inventor of the GDS. We all owe him a big
  844. Thanks!
  845.  
  846. Here's sample code for reading the joystick:
  847. ------------
  848. ;jsinit must be called to set up the joystick, otherwise
  849. reading back will ;have errors. This need only be called
  850. once.
  851. jsinit:     moveq #$40,d0
  852.       move.b      d0,$a10009
  853.       move.b      d0,$a1000b
  854.       move.b      d0,$a1000d
  855.       rts
  856. ;The following two routines can be used for reading from the
  857. joystick
  858. ;ports.
  859. ;porta and portb return a byte in d0. 0 bits mean button is
  860. not down,
  861. ;1 mean button is down.
  862. ;The order is:
  863. ;76543210
  864. ;SACBRLDU
  865. ;meaning Start, A, C, B, Right, Left, Down, Up
  866. porta:      move.b      #$40,$a10003
  867.       nop
  868.       nop
  869.       move.b      $a10003,d1
  870.       andi.b      #$3f,d1
  871.       move.b      #$00,$a10003
  872.       nop
  873.       nop
  874.       move.b      $a10003,d0
  875.       andi.b      #$30,d0
  876.       lsl.b #2,d0
  877.       or.b  d1,d0
  878.       not.b d0
  879.       rts
  880. portb:      move.b      #$40,$a10005
  881.       nop
  882.       nop
  883.       move.b      $a10005,d1
  884.       andi.b      #$3f,d1
  885.       move.b      #$00,$a10005
  886.       nop
  887.       nop
  888.       move.b      $a10005,d0
  889.       andi.b      #$30,d0
  890.       lsl.b #2,d0
  891.       or.b  d1,d0
  892.       not.b d0
  893.       rts
  894. -----------------------
  895.  
  896. Graphics code is another matter. Since I sell a development
  897. system, and one of the features is I provide technical info
  898. on the Genesis hardware, it would sort of be a conflict of
  899. interest for me to give things away :^).
  900.  
  901. -----------------------
  902.  
  903. The whole sample is not inlcuded because of it's size.
  904. However you can find the rest of the code, about 5 pages worth, at the
  905. same locations as this file. Look for a file called code.txt.
  906. These files will always be posted together.
  907.  
  908.         dc.l $FFFE00,$D7E,$200,$200,$200
  909.         dcb.l $17,$200
  910.         dc.l $E9E,$200,$EAE,$200,$20E
  911.         dcb.l $F,$20E
  912.         dcb.l $F,$200
  913.         dc.b "SEGA MEGA DRIVE (C)SEGA "
  914.         dc.b "1989.AUG _____",$87,"V        "
  915.         dc.b "                        "
  916.         dc.b "              ",$87,"V        "
  917.         dc.b "                        "
  918.         dc.b "        GM 00054010-01",$93,"G"
  919.         dc.b "JD              ",$0,$0,$0,$0,$0,$3,"",$FF
  920.         dc.b $0,"",$0,$0,$0,"",$FF,"                "
  921.         dc.b "                        "
  922.         dc.b "                        "
  923.         dc.b "JUE             "
  924.         move #$100,$A11100
  925.  
  926. =============================================================
  927.  
  928. 4.11 Four Way Player Tap from Electonic Arts. While no code
  929. is prodived, here is a hack of sorts. I am honoring the request
  930. of anonymity from the sender. The $__ are ports calls by the
  931. software to control the hardware (of couse).
  932.  
  933. With the EA 4 way play adapter, all the controllers are read through
  934. controller 1's port after sending the selection data out of controller
  935. 2's port. The selection data is $0C for controller 1, $1c for controller
  936. 2, $2c for controller 3, and $3c for controller 4.
  937.  
  938. The adaptor is detected by setting the registers in the following way.
  939. (This is from G______ C____ code, so don't ask me why they did some of
  940. this stupid stuff.)
  941.  
  942. $40->CTRL1
  943. $40->CTRL2
  944. $43->CTRL2 (This doesn't make sense... why set it twice?)
  945. $7C->DATA2 (This is probably masked off by the $43 above...)
  946. $7F->CTRL2
  947. $7C->DATA2
  948.  
  949. If you read DATA1 and either of the low 2 bits is set, there isn't a 4
  950. tap. You must enable writing to port two after that so that you can
  951. select the port.
  952.  
  953. Well this is the view from inside the machine... hope this helps you
  954. somewhat.
  955.  
  956. =============================================================
  957.  
  958. 4.2 Graphics, Color Palette and sprit control
  959.  
  960.  
  961. Hi,
  962.  
  963. I found a file called 'MegaDrive Documentation' on a BBS in Holland.
  964. I dunno which format it use (maybe an Amiga one) but it's easily redable.
  965. You'll maybe find some info in it for your faq. So here it is...
  966.  
  967. Regards,
  968.  
  969. David Delabassee <delabass@nic.INbe.net>
  970.  
  971. ==============================================================
  972.  
  973. DATABASE
  974. NODE MAIN "Table of Contents"
  975.  
  976.  
  977. Table of Contents:
  978.  
  979. {"About" LINK About }
  980. {"MegaDrive MAP" LINK Megarivemap}
  981. {"The VRAM" LINK TheVRAM }
  982. {"The Tiles 8*8" LINK TheTiles8*8}
  983. {"Horizontal Scrolls" LINK HorizontalScrolls}
  984. {"The CRAM" LINK TheCRAM}
  985. {"The Screens Maps" LINK TheScreensMaps}
  986. {"Priority of Plans" LINK Priority}
  987. {"The SRAM" LINK TheSRAM}
  988. {"Sprites List" LINK SpritesList}
  989. {"Access to the VRAM" LINK AccesstoVRAM}
  990. {"Video Registers" LINK Video-Registers}
  991. {"Interruptions" LINK Interruptions}
  992. {"Exceptions of 68000 of the GENESIS" LINK Exceptions}
  993.  
  994.  
  995. {"More InFormAtions" LINK Informations}
  996.  
  997.  
  998.  
  999. NODE  About "About"
  1000.  
  1001.       *     MEGADRIVE DOCUMENTATION VERSION 1.0 *
  1002.  
  1003.       Date   : 09-02-94
  1004.       Author : All Writen by MuMBlY / {"MYSTIC" LINK Informations}
  1005.  
  1006.  
  1007. ENDNODE
  1008.  
  1009. NODE  Megarivemap "megadrive map"
  1010.  
  1011. ----------------------------------------------------------------------
  1012.                   MEGADRIVE MAP
  1013. ----------------------------------------------------------------------
  1014.  
  1015.             000000-3FFFFF : 4 Megas Rom Cardtrige
  1016.             400000-9FFFFF : Reserved
  1017.             A00000-AFFFFF : I/O Ports
  1018.             B00000-BFFFFF : Reserved
  1019.             C00000-DFFFFF : Vdp
  1020.             E00000-FEFFFF : Ram Image
  1021.             FF0000-FFFFFF : 64kb RAM
  1022.  
  1023. ENDNODE
  1024.  
  1025. NODE TheVRAM "The VRAM"
  1026.  
  1027. The VRAM
  1028. ----------------------------------------------------------------------
  1029.  
  1030. The 'RAM video' (64 kb) is used for countaining all informations of
  1031. the screen.
  1032.  
  1033. - Caracters (tiles) of 8*8 pixels in 16 colors (32 bytes per caracters).
  1034. - Screens (2 screen of 32*32 to 128*128 in 64 colors).
  1035. - Attributs of Sprites (maximum of 80 sprites).
  1036. - Horizontal pointers of scrollings (1 pointer per line).
  1037.  
  1038. ENDNODE
  1039.  
  1040. NODE TheCRAM "The CRAM"
  1041.  
  1042. ----------------------------------------------------------------------
  1043.                   The CRAM
  1044. ----------------------------------------------------------------------
  1045.  
  1046. The 'RAM color' (128 bytes) is used for containing the 4 palettes of 16
  1047. colors (1 word per color).
  1048.  
  1049. - Each Color is coded on 12 bits:
  1050.   Bit 11-8 : Bleue Value
  1051.   Bit 7-4  : Green Value
  1052.   Bit 3-0  : Red   Value
  1053.  
  1054. THe least signicative bit of each value is ignored, that is given a palette
  1055. of 8*8 values =3D 512 differents colors
  1056.  
  1057. ENDNODE
  1058.  
  1059. NODE TheSRAM "The SRAM"
  1060.  
  1061. ----------------------------------------------------------------------
  1062.                   The SRAM
  1063. ----------------------------------------------------------------------
  1064.  
  1065. The 'Scroll RAM' (128 Bytes ?)is used for countaining values of vertical
  1066. scrolling.
  1067.  
  1068. ENDNODE
  1069.  
  1070. NODE TheTiles8*8 "The Tiles 8*8"
  1071.  
  1072. ----------------------------------------------------------------------
  1073.                   The Tiles 8*8
  1074. ----------------------------------------------------------------------
  1075.  
  1076. The Tiles of 8*8 pixels in 16 colors.
  1077. Each tile is longer of 32 bytes.
  1078. The Format is simple : 1 longer word per line*8lines.
  1079. Each Pixel is represented in an half-byte.
  1080.  
  1081. Example : dc.1$01111100 ; letter A in Color 1 !
  1082.         dc.1$11000110
  1083.         dc.1$11000110
  1084.         dc.1$11111110
  1085.         dc.1$11000110
  1086.         dc.1$11000110
  1087.         dc.1$11000110
  1088.         dc.1$00000000
  1089. ENDNODE
  1090.  
  1091. NODE TheScreensMaps "The Screens Maps"
  1092.  
  1093. ----------------------------------------------------------------------
  1094.                   The Screens Maps
  1095. ----------------------------------------------------------------------
  1096.  
  1097. The GENESIS is able to manage 2 SUperposed screens (Playfields).
  1098. Each palyfield can do of 32*32 tiles until 128*128 tiles.
  1099. Each tiles is coded on 1 word and are consecutive in the screen map.
  1100.  
  1101. The Format is
  1102.       Bit 15    : {"Priority" LINK Priority}
  1103.         Bit 14-13 : Palette  ( 0 to 3 )
  1104.         Bit 12    : Vertical Flipping
  1105.         Bit 11    : Horizontal Flipping
  1106.         Bit 10-0  : Tile number ( 0 to 2047 )
  1107.  
  1108. Example :
  1109.       dc.w $8001 ; Priority =3D 1, Pallette =3D 0, no Flipping, Tile number #1
  1110.  
  1111. ENDNODE
  1112.  
  1113. NODE Spriteslist "Sprites LIst"
  1114.  
  1115. ----------------------------------------------------------------------
  1116.                   Sprites List
  1117. ----------------------------------------------------------------------
  1118.  
  1119. The GENESIS is able to manage until 80 sprites on the screen.
  1120. The only limit is of 20 sprites per line of pixel and of 320 pixels
  1121. of sprites per line. ( ya can display 20 sprites of 16 pixels of large
  1122. with the same Y-axis but which 10 sprites of 32 pixels of large )
  1123.  
  1124. The sprites used the same tiles that the screen.
  1125. THose lastest can do of 1*1 tiles to 4*4 tiles.
  1126.  
  1127. Format of the list of sprites to display (8 bytes per sprite) :
  1128.  
  1129. byte 0-1 : Y-axis (0 to 511)+$80
  1130. byte 2   : SIze    (bit 0-1 : height 0-3+1 , Bit 2-3 : width 0-3+1)
  1131. byte 3   : Link Data ( next sprite in the list or 0 for end of list)
  1132. byte 4-5 : Fisrt number tile sprite (See farther !)
  1133. bute 6-7 : X-axis (0 to 511)+$80
  1134.  
  1135. It indicate that the first tile of sprite b'coz the GENESIS deduces
  1136. automaticaly the next as that :
  1137.  
  1138.       Tile #1:Tile #4 ; Sprite of 16 pixels on 24 pixels
  1139.       Tile #2:Tile #5
  1140.       Tile #3:Tile #6
  1141. =09
  1142. The format of tile number is same at format of screens
  1143. That's limit the sprites to 16 colors (maxi!).
  1144. The Flipping is indicated for the complete sprite.
  1145.  
  1146. example List :
  1147. =09
  1148.  dc.w $0+$80  ; Y-axis in the top of screen (0)
  1149.  dc.b %0101   ; Size 16*16 pixels
  1150.  dc.b 1       ; Number of the next sprite in the List for the priority
  1151.  dc.w $4001   ; Palette =3D 2, First tile =3D 1, No Flipping=
  1152.  (Tiles#1,#2,#3,#4)
  1153.  dc.w $0+$80  ; X =3D 0
  1154.  dc.w $40+$80 ; Y =3D 64
  1155.  dc.b %0001   ; Size 8*16 pixels
  1156.  dc.b 0       ; Last sprite
  1157.  dc.w $5001   ; Palette 2, Vertical Flipping, Tile #1 (Tile #1,#2)
  1158.  dc.w $40+$80 ; X =3D 64
  1159.  
  1160.  the order of sprites in the list indicates the priority of sprites between
  1161.  them : the first sprite is First Plan.
  1162. ENDNODE
  1163.  
  1164. NODE HorizontalScrolls "Horizontal Scrolls"
  1165.  
  1166. ----------------------------------------------------------------------
  1167.                   Horizontal Scrolls
  1168. ----------------------------------------------------------------------
  1169.  
  1170. The GENESIS is able to manage an horizontal offset for each line.
  1171.  
  1172. The Format for each horizontal offset :
  1173.  
  1174.  1 word for each offset of playfield A
  1175.  1 word for each offset of playfield B
  1176.  ...
  1177.  
  1178.  Example :
  1179.  
  1180.  dc.w $0001 ; A move of 1 pixel about right for playfield A
  1181.  dc.w $ffff ; A move of 1 pixel about left for playfield B
  1182.  dc.w $0002 ; 2 pixels to right for A (second line)
  1183.  dc.w $0003 ; 3 pixels to right for B (second line)
  1184.  ...
  1185.  
  1186.  it's possible to have a pointer which functions for all screen or for all
  1187.  tiles or for all lines.
  1188.  The numbber of pointer is in function of choose mode.
  1189. ENDNODE
  1190.  
  1191. NODE Priority "Priority of Plans"
  1192.  
  1193. ----------------------------------------------------------------------
  1194.                   Priority of Plans
  1195. ----------------------------------------------------------------------
  1196.  
  1197. Each Tiles of each screen and each sprite countains a bit of priority.
  1198. That settles the priorities of plans between them and the sprites with
  1199. plans.
  1200. When all bits are to 0 : the sprites are on the screen A which is on the
  1201. screen B. Each bit that we have putting to 1, does moving the plan.
  1202.  
  1203. Example :
  1204.  Screen B=3D1, Screen A=3D0, Sprite=3D0
  1205.  The screen B pass in front of the sprites which goes in front of the
  1206.  screen A.
  1207. ENDNODE
  1208.  
  1209. NODE AccesstoVRAM "Access to the VRAM"
  1210.  
  1211. ----------------------------------------------------------------------
  1212.                   Access to the VRAM
  1213. ----------------------------------------------------------------------
  1214.  
  1215. On MAnual Mode (without SRAM) :
  1216. 2 ports are used : 1 for the address and 1 for the data.
  1217. the two ports are on 32 bits and the address increases itself
  1218. automaticaly.
  1219. the only prolem is that it must to code the address which follows the type
  1220. of RAM that we want to address.
  1221.  
  1222. For the VRAM : Address 0-FFFF
  1223.  
  1224.  ((address and $3fff)+$4000)*$10000+(($1c000 and address)shr 14)
  1225.  
  1226. For the CRAM : Address 0-7F
  1227.  
  1228.  ($c000+address)*$10000
  1229.  
  1230. For the SRAM : Address 0-7F ?
  1231.  
  1232.  (($3fff and address)+$4000)*$10000+$10
  1233.  
  1234.  The address is putting in the vdp_cmd ($c00004)
  1235.  
  1236.  The Data is putting in the vdp_dat ($c00000)
  1237.  
  1238. Example :
  1239.  
  1240.  move.1#$c0000000,vdp_cmd ; Address 0 of the CRAM
  1241.  move.1#$c0000eee,vdp_dat ; color 0 and 1 of the first palette (black&white)
  1242.  move.w#$0444,vdp_dat ; color 2 of the first palette (Dark Grew)
  1243. ENDNODE
  1244.  
  1245. NODE Video-Registers "Video Registers"
  1246.  
  1247. ----------------------------------------------------------------------
  1248.                   Video Registers
  1249. ----------------------------------------------------------------------
  1250.  
  1251. the write access to video regiters does by the vdp_cmd
  1252. it codes on a word :
  1253.  
  1254.       Bit 15=3D1 : indicates that's a register
  1255.       Bit 14-8 : number of register
  1256.       Bit 7-0  : Value to write in the register
  1257.  
  1258. Example :
  1259.  
  1260.  move.w#$8000,vdp_cmd ; Register #0=3D0
  1261.  move.1#$81ff8200     ; Register #1=3Dff, register #2=3D0
  1262.  
  1263. Register #0
  1264.  
  1265.  Bit 7 : 0
  1266.  Bit 6 : 0
  1267.  Bit 5 : 0
  1268.  Bit 4 : Control interrupt H(Niv 4) 1:ON 0:OFF
  1269.  Bit 3 : 0
  1270.  Bit 2 : 1
  1271.  Bit 1 : Control mode screen ?
  1272.  Bit 0 : 0
  1273.  
  1274. Register #1
  1275.  
  1276.  Bit 7 : 0
  1277.  Bit 6 : TV 1:ON 0:OFF
  1278.  Bit 5 : Control Interrupt V(Niv 6) 1:ON 0:OFF
  1279.  Bit 4 : DMA 1:ENABLE 0:DISABLE
  1280.  Bit 3 : 0:NTSC(28 lines Cell) 1:PAL(30 lines Cell)
  1281.  Bit 2 : 1
  1282.  Bit 1 : 0
  1283.  Bit 0 : 0
  1284.  
  1285. Register #2
  1286.  
  1287.  Address of base of the Screen MAP A/$400 (that all the $2000).
  1288.  
  1289. Register #3
  1290.  
  1291.  Address of base of the window/$400 (Third Screen)   (D000)
  1292.  
  1293. Register #4
  1294.  
  1295.  Address of base of Screen MAP B/$2000               (E000)
  1296.  
  1297. Register #5
  1298.  
  1299.  Address of base of the list of sprites/$200         (BC00)
  1300.  
  1301. Register #6
  1302.  
  1303.  Not used (0)
  1304.  
  1305. Register #7
  1306.  
  1307.  Background Color (0 to 63) : 'Border' color.
  1308.  
  1309. Register #8 and #9
  1310.  
  1311.  Not used (0)
  1312.  
  1313. Register #10
  1314.  
  1315.  Line counter per H interrupt (0 to 255).
  1316.  
  1317. Register #11
  1318.  
  1319.  Bit 7-4 : 0
  1320.  Bit 3   : Level 2 Interrupt 1:ON 0:OFF
  1321.  Bit 2   : Vertical Scroll Control 1: An offset per 16 pixels
  1322.                            0: An Screen offset
  1323.  Bit 1-0 : Horizontal Scroll Control
  1324.             00 : An Screen offset
  1325.             01 : Not Used
  1326.             10 : An offset per cellule
  1327.             11 : An offser per line
  1328.  
  1329. Register #12
  1330.  
  1331.  Bit 7 : Must be as the bit 0
  1332.  Bit 6 : 0
  1333.  Bit 5 : 0
  1334.  Bit 4 : 0
  1335.  Bit 3 : Shadow effect between Playfields and the sprites 1:ON 0:OFF
  1336.  Bit 2 : Vertival Resolution (224 or 448 pixels)
  1337.  Bit 1 : Entrelaced ( only on entrelaced : 448 pixels are possible)
  1338.  Bit 0 : 32 Tiles per line or 40 tiles per line (320 or 256 pixels)
  1339.  
  1340. Register #13
  1341.  
  1342.  Address of base for Horizontal Scrolls/$400         (B800)
  1343.  
  1344. Register #14
  1345.  
  1346.  Not used (0)
  1347.  
  1348. Register #15
  1349.  
  1350.  Increase offset of vdp_cmd in word
  1351.  
  1352. Register #16
  1353.  
  1354.  Bit 7-6 : 0
  1355.  Bit 5-4 : Size Vertical Screen Maps A and B 00:32 01:64 10:USED 11:128
  1356.  Bit 3-2 : 0
  1357.  Bit 1-0 : SIze Horizontal Screen Maps A and B ( Same format as Vertical)
  1358.  
  1359. Register #17
  1360.  
  1361.  Horizontal Dimension Window
  1362.  
  1363. Register #18
  1364.  
  1365.  Vertical Dimension Window
  1366.  
  1367. Register #19                                         (93)
  1368.  
  1369.  Less weight longer transfert DMA
  1370.  
  1371. Register #20                                   (94)
  1372.  
  1373.  Strong Weight longer transfert DMA
  1374.  
  1375. Register #21                                         (95)
  1376.  
  1377.  DMA Source Less Weight
  1378.  
  1379. Register #22                                         (96)
  1380.  
  1381.  DMA Source Strong Weight for VRAM or Middle Weight for RAM
  1382.  
  1383. Register #23                                         (97)
  1384.  
  1385.  DMA Control
  1386.  
  1387.  Bit 7   : Source 1:VRAM 0:RAM
  1388.  Bit 6   : Source 1:ON 0:OFF (or Bit 23 Source RAM)
  1389.  Bit 5-0 : RAM Source ( Bit 22-17)
  1390.  In thiz case of RAM Source, the bits 6-0 are considerated as the strong
  1391.  weight of the source.
  1392. ENDNODE
  1393.  
  1394. NODE Interruptions "Interruptions"
  1395.  
  1396. ----------------------------------------------------------------------
  1397.                   INTERRUPTIONS
  1398. ----------------------------------------------------------------------
  1399.  
  1400.  The interruptions are of the 68000 : (!!!!!!)
  1401.  
  1402.  Level 2 : External Interrupt (???)
  1403.  Level 4 : H interrupt (Interruption Raster Runs by the VDP)
  1404.  Level 6 : V interrupt (Interruption Vertical Blanck)
  1405.  
  1406.  ...
  1407. ENDNODE
  1408.  
  1409. NODE Exceptions "Exceptions of 68000 of the GENESIS"
  1410.  
  1411. *****************************************************************
  1412.             EXCEPTIONS OF 68000 OF THE GENESIS
  1413. *****************************************************************
  1414.  
  1415.       $00   SYSTEM SSP
  1416.       $04   SYSTEM PC
  1417.       $08   BUS ERROR
  1418.       $0C   ADDRESS ERROR
  1419.       $10   ILLEGAL INSTRUCTION
  1420.       $14   DIVISION BY ZERO
  1421.       $18   CHK EXCEPTION
  1422.       $1C   TRAPV EXCEPTION
  1423.       $20   PRIVILEGE VIOLATION
  1424.       $24   TRACE EXCEPTION
  1425.       $28   LINE-A EMULATOR
  1426.       $2C   LINE-F EMULATOR
  1427.       $30   RESERVED BY MOTOROLA
  1428.       $34   RESERVED BY MOTOROLA
  1429.       $38   RESERVED BY MOTOROLA
  1430.       $3C   RESERVED BY MOTOROLA
  1431.       $40   RESERVED BY MOTOROLA
  1432.       $44   RESERVED BY MOTOROLA
  1433.       $48   RESERVED BY MOTOROLA
  1434.       $4C   RESERVED BY MOTOROLA
  1435.       $50   RESERVED BY MOTOROLA
  1436.       $54   RESERVED BY MOTOROLA
  1437.       $58   RESERVED BY MOTOROLA
  1438.       $5C   RESERVED BY MOTOROLA
  1439.       $60   SPURIOUS EXCEPTION
  1440.       $64   INTERRUPT REQUEST LEVEL 1
  1441.       $68   INTERRUPT REQUEST LEVEL 2
  1442.       $6C   INTERRUPT REQUEST LEVEL 3
  1443.       $70   INTERRUPT REQUEST LEVEL 4 (VDP INTERRUPT)
  1444.       $74   INTERRUPT REQUEST LEVEL 5
  1445.       $78   INTERRUPT REQUEST LEVEL 6 (VERTICAL BLANK)
  1446.       $7C   INTERRUPT REQUEST LEVEL 7
  1447.       $80   TRAP #00 EXCEPTION
  1448.       $84   TRAP #01 EXCEPTION
  1449.       $88   TRAP #02 EXCEPTION
  1450.       $8C   TRAP #03 EXCEPTION
  1451.       $90   TRAP #04 EXCEPTION
  1452.       $94   TRAP #05 EXCEPTION
  1453.       $98   TRAP #06 EXCEPTION
  1454.       $9C   TRAP #07 EXCEPTION
  1455.       $A0   TRAP #08 EXCEPTION
  1456.       $A4   TRAP #09 EXCEPTION
  1457.       $A8   TRAP #10 EXCEPTION
  1458.       $AC   TRAP #11 EXCEPTION
  1459.       $B0   TRAP #12 EXCEPTION
  1460.       $B4   TRAP #13 EXCEPTION
  1461.       $B8   TRAP #14 EXCEPTION
  1462.       $BC   TRAP #15 EXCEPTION
  1463.       $C0   RESERVED BY MOTOROLA
  1464.       $C4   RESERVED BY MOTOROLA
  1465.       $C8   RESERVED BY MOTOROLA
  1466.       $CC   RESERVED BY MOTOROLA
  1467.       $D0   RESERVED BY MOTOROLA
  1468.       $D4   RESERVED BY MOTOROLA
  1469.       $D8   RESERVED BY MOTOROLA
  1470.       $DC   RESERVED BY MOTOROLA
  1471.       $E0   RESERVED BY MOTOROLA
  1472.       $E4   RESERVED BY MOTOROLA
  1473.       $E8   RESERVED BY MOTOROLA
  1474.       $EC   RESERVED BY MOTOROLA
  1475.       $F0   RESERVED BY MOTOROLA
  1476.       $F4   RESERVED BY MOTOROLA
  1477.       $F8   RESERVED BY MOTOROLA
  1478.       $FC   RESERVED BY MOTOROLA
  1479. ENDNODE
  1480.  
  1481. NODE InFormAtions "More InFormAtions"
  1482.  
  1483. =============================================================
  1484.  
  1485. The 68000 keeps all of it's interrupt vectors in the first 1k of memory
  1486. (this is cartridge ROM!) The first 10 longwords are:
  1487. Stack pointer after reset
  1488. Program counter after reset
  1489. Bus Error
  1490. Address Error
  1491. Illegal Instruction
  1492. Division by Zero
  1493. CHK instruction
  1494. TRAPV instruction
  1495. Priviledge violation
  1496. Trace
  1497.  
  1498. The external interrupts start at $60 (vector 25-31) and end at $7F. Now
  1499. all videogame units have a variety of interrupts of VBlank and HBlank. If
  1500. you poke arount the interrupt table with the hints I've given you, and
  1501. follow those addresses into the code, you can probably find the VBLANK
  1502. and HBLANK routines for any given game. The vblank routines often read
  1503. the controllers, do DMA, access video RAM, etc. so this is a good short
  1504. cut to find meaty code within the machine! (Look for nice round addresses
  1505. close together... wouldn't those be VDP registers?) HBLANK is even better
  1506. if a game uses it (look at any sonic game!) because they must be short
  1507. (and are thus easily identifiable when traced from the interrupt table
  1508. vectors), generally they only have one or two instructions to load their
  1509. data into the VDP before it will be displayed on the screen, so you
  1510. should immediately be able to figure out how to load palettes into the
  1511. Genesis.
  1512.  
  1513. Look atSonic the Hedgehog 1 dissassembly, following the interrupt vectors
  1514. to find the HBLank routine. (All interrupt routines should end in RTE.)
  1515.  
  1516. Notice there is one branch and then some set up and a lot of longword
  1517. writes. Try changing these writes to write constant data and then look at
  1518. some section of the game which uses Hblank interrupts. Betcha the colors
  1519. have changed...(oops... the game will hang because the checksum is
  1520. no longer good. You must find the checksum and step over it... trace
  1521. through initialization till you find it... I think it should end on a
  1522. nice round address, but it's been a while so I am not sure. Look for a
  1523. loop with an add in it and nothing else. The checksum is stored in a
  1524. place where changing it will not change the checksum, lots of other data
  1525. like that is there... good luck!) Anyway, if you disable the checksum and
  1526. change the data in hblank then play a board with water I think you will
  1527. understand how to change color palettes on the Genesis!
  1528.  
  1529. If you can figure this out, you can probably guess that writing other
  1530. data to the VDP is very similar. Look at the VBlank code to see what it
  1531. does with similar addresses to figure out how to write characters and
  1532. stuff. This is pretty convoluted, unfortunately. I can only suggest that
  1533. you look at very old games for this information as they are programmed
  1534. more simply.
  1535.  
  1536. I hope this helps you somewhat. I ask that you don't print this as I have
  1537. written it, and what you do print please don't mention me as I could get
  1538. in trouble. If you do some hacking and get stuck, let me know and I'll
  1539. give you some more hints. I hate not being able to say things directly,
  1540. because I think the Genesis is a wonderful piece of hardware and wish
  1541. everyone could know how great it is.
  1542.  
  1543. P.S. don't look at Road Rash, it will drive you INSANE! It seems to run
  1544. entirely in VBLANK and HBLANK! I figured out the 4-TAP by looking for
  1545. Joystick accesses in the VBLANK code... easy!
  1546.  
  1547. =============================================================
  1548.  
  1549. 5.0 Language Switch, from Rec.Games.Video FAQ
  1550.  
  1551. How to make a language switch (Genesis/MD).
  1552.  
  1553. On a Genesis/MD, there are jumpers labelled JP1, JP2, JP4,
  1554. and JP3.  The Genesis has a capacitor on JP1 and a trace on
  1555. JP2; the Mega Drive has a capacitor on JP2 and a trace on
  1556. JP1.  The bottom ends of JP1 and JP2 are connected together.
  1557. So if you cut the trace and the top end of the capacitor, and
  1558. install a DPDT switch between them which reconnects them
  1559. either unchanged or swapped left to right, you have a
  1560. language switch. You'll need some wire, a soldering iron,
  1561. solder, and a DPDT switch.
  1562.  
  1563. Some machines have an open circuit instead of the capacitor.
  1564. Also, I've been told that even if there is a capacitor, you
  1565. can throw it out and leave an open circuit. Either way, the
  1566. switch is a lot simpler, requiring a SPDT switch and less
  1567. wire and solder.
  1568.  
  1569. Several people have told me that you could just cut both JP1
  1570. and JP2 and put a SPST switch on JP1. This is even simpler,
  1571. but I'm not sure it really works, as opposed to putting your
  1572. machine in an intermediate state that only sort-of works.
  1573.  
  1574. The redesigned Genesis 2 machines don't appear to have either
  1575. the capacitor or circuit. Nobody yet knows how to make the
  1576. language switch for one, though there are language switch
  1577. cartridges you can buy to act as one.
  1578.  
  1579. IF YOUR MACHINE HAS NO CAPACITOR (or if you want to cross
  1580. your fingers and throw away your capacitor) and is not a
  1581. Genesis 2:
  1582.  
  1583. Cut JP2.  The trace might be covered with paint and hard to
  1584. see.  (If you started with a Mega Drive, JP2 is open and you
  1585. have to cut JP1 instead.) If you aren't sure which end I mean
  1586. by "bottom", just check the back of the board to see which
  1587. end is connected together.
  1588.  
  1589.    Original state of machine:             After cutting:
  1590.  
  1591.        JP2 top     JP1 top              JP2 top     JP1 top
  1592.           |           |                    |           |
  1593.           |           |                    |           |
  1594.           |
  1595.           |
  1596.           |
  1597.           |
  1598.           |           |                    |           |
  1599.            \         /                      \         /
  1600.             \_______/                        \_______/
  1601.           bottom of both                   bottom of both
  1602.  
  1603. Add a SPDT switch which can be in one of two positions:
  1604.               ._ _ _ _ _ _ _ _ _ _ _ _
  1605.              .                        .
  1606.             .           . _ _ _ _ _ _ _ _ _ _
  1607.            .           .                .    .
  1608.        JP2 top     JP1 top               .    .
  1609.           |           |                  .    .
  1610.           |           |                 _________
  1611.                                         | o   o |
  1612.                                         | \     |
  1613.                                         |  \    |
  1614.                                         \___o___/
  1615.           |           |                     .
  1616.            \         /                      .
  1617.             \_______/ - - - - - - - - - - - -
  1618.           bottom of both
  1619.  
  1620.               ._ _ _ _ _ _ _ _ _ _ _ _
  1621.              .                        .
  1622.             .           . _ _ _ _ _ _ _ _ _ _
  1623.            .           .                .    .
  1624.        JP2 top     JP1 top               .    .
  1625.           |           |                  .    .
  1626.           |           |                 _________
  1627.                                         | o   o |
  1628.                                         |     / |
  1629.                                         |    /  |
  1630.                                         \___o___/
  1631.           |           |                     .
  1632.            \         /                      .
  1633.             \_______/ - - - - - - - - - - - -
  1634.           bottom of both
  1635. -------------------------------------------------------------
  1636.  
  1637. IF YOUR MACHINE DOES HAVE THE CAPACITOR:
  1638.  
  1639. Cut both sides.  (Note: if you started with a Japanese Mega
  1640. Drive the capacitor will be on the side labelled X instead)
  1641.  
  1642.    Original state of machine:             After cutting:
  1643.  
  1644.        JP2 top     JP1 top              JP2 top     JP1 top
  1645.           |           |                    |           |
  1646.           |           |                    |           |
  1647.           |           |
  1648.           |           |
  1649.           |           |                    |
  1650.         X |          ###                 X |          ###
  1651.           |          ###                   |          ###
  1652.           |          ###                   |          ###
  1653.            \         /                      \         /
  1654.             \_______/                        \_______/
  1655.           bottom of both
  1656.  
  1657. add switch which can be in one of two positions:
  1658.  
  1659.        JP2 top     JP1 top
  1660. (Connect 2 to 2
  1661.           |           |
  1662. and 1 to 1)
  1663.           |           |
  1664.           2           1                   2  1  1  2
  1665.                                         ______________
  1666.            _ _ _ _ _ _ _ _ _ _          | o  o  o  o |
  1667.           |                   `         |  \  \      |
  1668.         X |          ###`      `        |   \  \     |
  1669.           |          ### `      `       \____o__o____/
  1670.           |          ###  `      `           '  '
  1671.            \         /     `      `- - - - -'  '
  1672.             \_______/       ` _ _ _ _ _ _ _ _ '
  1673.           bottom of both
  1674.  
  1675.        JP2 top     JP1 top
  1676. (Connect 2 to 2
  1677.           |           |
  1678. and 1 to 1)
  1679.           |           |
  1680.           2           1                   2  1  1  2
  1681.                                         ______________
  1682.            _ _ _ _ _ _ _ _ _ _          | o  o  o  o |
  1683.           |                   `         |      /  /  |
  1684.         X |          ###`      `        |     /  /   |
  1685.           |          ### `      `       \____o__o____/
  1686.           |          ###  `      `           '  '
  1687.            \         /     `      `- - - - -'  '
  1688.             \_______/       ` _ _ _ _ _ _ _ _ '
  1689.           bottom of both
  1690.  
  1691.  
  1692. 50/60 hertz switch.
  1693.  
  1694. You can build a 50/60 hertz switch on a Genesis/Mega Drive
  1695. like a language switch, but using jumpers JP3 and JP4.  The
  1696. standard setting is 50 in PAL areas such as Europe, and 60 in
  1697. NTSC areas like the US and Japan. In the 60 hertz mode, the
  1698. game is faster and the screen taller; however, not all TVs
  1699. and monitors in Europe can display this mode.
  1700.  
  1701.  
  1702. Some American/Japanese games are protected to keep Europeans
  1703. >from playing them; this protection checks the 50/60 hertz
  1704. setting.  You can usually get around it by installing the
  1705. switch and switching when starting the game, then switching
  1706. back afterwards.
  1707.  
  1708. Many European games are simple ports of American or Japanese
  1709. games and are not redesigned for 50 hertz, so work faster and
  1710. with "better" screen proportions if played at 60 hertz.
  1711.  
  1712.  
  1713. Genesis/Mega Drive dual version (language switch) list:
  1714.  
  1715.    *Battle Maina 2: The game plays in both positions. However
  1716.      with both controlers removed, a system info screen appears
  1717.      which informs about system version, langauge mode.
  1718.     Bonanza Brothers: Game plays in Japanese.  (Maybe. There
  1719.      seems to be more than one version floating around.)
  1720.     Columns: Game plays in Japanese.
  1721.    *Cyberball: Japanese version has a modem option.
  1722.     Dragon's Fury: Works only with language set to English.
  1723.      The original, Devil's Crush MD, works either way.
  1724.     Dynamite Duke: Harder on the Mega Drive.
  1725.     Elemental Master: Harder on the Mega Drive.
  1726.     Fatal Labyrinth: Game plays in Japanese.
  1727.     Fire Shark: Different title screen with Kanji.
  1728.     Flicky: Characters have Japanese names and instructions
  1729.      are in Japanese.
  1730.     Forgotten Worlds: Game plays in Japanese.
  1731.     Gaiares: only mentions the Japanese licensee on the title
  1732.      screen, and has Japanese text; you can also select
  1733.      Japanese text from the option screen.
  1734.     Ghostbusters: Game plays in Japanese.
  1735.     Ghouls and Ghosts: Different title screen with Kanji.  To
  1736.      see it on a Genesis, select the last music and sound (26
  1737.      and 56) from the options screen, then press lower left;
  1738.      A, B, or C; and Start all at the same time.  (I never
  1739.      tried this, but Gamepro magazine claimed it works.) The
  1740.      game shows some other Japanese text, and when you die
  1741.      during a boss you start out earlier.
  1742.     Insector X: Title screen refers to company as Hot-B, not
  1743.      Sage's Creation. The MD version shoots more slowly. The
  1744.      ending text is still English.
  1745.    *Marvel Land: The Japanese version says "for Mega Drive"
  1746.      or "for Genesis" but the language stays Japanese. (What
  1747.      does an English version do?)
  1748.     Monaco GP: Game plays in Japanese (also an option on the
  1749.      option screen).
  1750.     Mystic Defender: This game is actually the anime-based
  1751.      Kujaku-Ou (Peacock King) 2 game. In Japanese mode, the
  1752.      opening text is replaced by a graphics screen (never
  1753.      seen in the US version) with Japanese.  The levels have
  1754.      names, the main character wears a white robe, the
  1755.      lightning magic effect is different, and the character
  1756.      is named Kujaku in the ending (which is still English).
  1757.     Outrun: The attract mode lacks sound, the startup screen
  1758.      says "push" (not "press") start button, and "(C) Sega
  1759.      1986, 1991" is printed in reverse order. The default
  1760.      options are KM/H and a different button selection (but
  1761.      can still be changed on the option screen).
  1762.     Quackshot: Game plays in Japanese.
  1763.     Raiden Trad: The "licensed to Sega" line is absent on
  1764.      both title screens, and the second title screen includes
  1765.      only the Japanese part instead of the non-Japanese part
  1766.      of the first one.
  1767.     Revenge of Shinobi: Title changes to Super Shinobi;
  1768.      credits show at the end.
  1769.     Rolling Thunder II: The Japanese version only works on a
  1770.      Japanese setting. The US version works either way (and
  1771.      isn't bilingual).
  1772.     Sonic the Hedgehog II: Tails is renamed to "Miles".
  1773.     Streets of Rage: Title screen changes to Bare Knuckle,
  1774.      and all text is in Japanese, including the introduction.
  1775.      The clock resets when you encounter the bosses.
  1776.     Streets of Rage II: Turns to Bare Knuckle II, and renames
  1777.     Skate to Sammy --_if_ you change the setting sometime
  1778.      after turning the machine on (to skip the lockout).
  1779.     Thunder Force II: Title screen has "MD" on it, and
  1780.      company name is "Tecnosoft".
  1781.     Thunder Force III: company's name is spelled "Tecnosoft".
  1782.    *Thunder Storm FX (CD): Turns to Cobra Command in US mode.
  1783.     Truxton: Japanese title is Tatsujin.
  1784.     Twin Hawk: Different title screen with Kanji.
  1785.    *Wrestle War: The wrestler is blond on a Genesis and
  1786.      black-haired on a MD.
  1787.  
  1788.     * Information from testing a Japanese game
  1789.  
  1790. =============================================================
  1791.  
  1792. 6.0 Sega Internet Information - This information came from
  1793. Bernd P. Ziller. Mailing to any of these site (or FTP, gopher,
  1794. etc.) will not work due to a firewall. They are looking out, but
  1795. we can't look in. I stongly suggest that you don't try anything
  1796. stupid.
  1797.  
  1798.  segaoa.com       198.176.13.13      130slmail        198.176.14.65
  1799.  loghost          198.176.13.13      localhost        127.0.0.1
  1800.  400mail          198.176.14.57      pd275            198.176.14.68
  1801.  trixie           198.176.9.40       torcable         198.176.14.53
  1802.  pd130            198.176.14.61      storm            198.176.11.47
  1803.  segaintera       198.176.14.52      segaoa           198.176.13.13
  1804.  sonic            198.176.13.13      blackhole        198.176.14.69
  1805.  multimedia       198.176.14.63      pd1              198.176.14.62
  1806.  segard           198.176.14.51      segaeurope       198.176.14.50
  1807.  tormail          198.176.14.54      si32             198.176.14.55
  1808.  sb1mail          198.176.14.60      macpo            198.176.14.67
  1809.  pluto            198.176.9.52       fremontml        198.176.14.56
  1810.  racerx           198.176.9.41       hummer           198.176.11.55
  1811.  303tdmail        198.176.14.64      sb2mail          198.176.14.58
  1812.  ftp              198.176.13.13      gambit           198.176.11.46
  1813.  Emerald_Dragon   198.176.8.22
  1814.  
  1815. =============================================================
  1816.  
  1817. I am still hoping to expand this document. I am looking for
  1818. information on the Sega Multitap, CD, 32-X (Mars), HMD, hardware
  1819. in general, Saturn, and the controllers.
  1820.  
  1821. Please E-Mail me for a copy or to add information to this
  1822. list. Again My E-Mail address is:
  1823.  
  1824. U6c16@Wvnvm.Wvnet.Edu
  1825.  
  1826. Snail Mail:
  1827.  
  1828. Henry Rieke
  1829. Attn: Sega FAQ
  1830. 161 Poplar Dr
  1831. Morgantown, Wv 26505-2340
  1832.  
  1833. A Very Special Thanks to:
  1834.  
  1835. David Ashley <dash@netcom.com>
  1836.  
  1837. Rober Leyland <Leyland@island.COM>
  1838.  
  1839. David Delabassee <delabass@nic.INbe.net>
  1840.  
  1841. Special Thanks to :
  1842.  
  1843. Scott Golby <sgolby@st.nepean.uws.edu.au>
  1844.  
  1845. Rick McTeague <sysrick@starbase.spd.louisville.edu>
  1846.  
  1847. Landon Dyer <landon@apple.com>
  1848.  
  1849. Neal Howland <nhowland@matt.ksu.ksu.edu>
  1850.  
  1851. Bernd P. Ziller <bziller@ba-stuttgart.de>
  1852. WPCD12cpiPanasonic
  1853. KX-P118017 Feb 94 09:30:55 +0100
  1854. From:
  1855. Subject: Re: What Language are games programmed in?
  1856. To: U6C16@WVNVM.BITNET
  1857. Message-id: <9402170830.AA16515@leda.pt.hk-r.se>
  1858. X-Envelope-to: U6C16@WVNVM.BITNET
  1859.  
  1860. Heres an extract from the game _____. I just included some of the beginning
  1861. of the code and some ASCII segments. I hope you are satisfied with this.
  1862.  
  1863.  
  1864.  
  1865.  
  1866.         dc.l $FFFE00,$D7E,$200,$200,$200
  1867.         dcb.l $17,$200
  1868.         dc.l $E9E,$200,$EAE,$200,$20E
  1869.         dcb.l $F,$20E
  1870.         dcb.l $F,$200
  1871.         dc.b "SEGA MEGA DRIVE (C)SEGA "
  1872.         dc.b "1989.AUG _____",$87,"V        "
  1873.         dc.b "                        "
  1874.         dc.b "              ",$87,"V        "
  1875.         dc.b "                        "
  1876.         dc.b "        GM 00054010-01",$93,"G"
  1877.         dc.b "JD              ",$0,$0,$0,$0,$0,$3,"",$FF
  1878.         dc.b $0,"",$0,$0,$0,"",$FF,"                "
  1879.         dc.b "                        "
  1880.         dc.b "                        "
  1881.         dc.b "JUE             "
  1882.         move #$100,$A11100
  1883.         nop
  1884.         rte
  1885.         bra.s $20C
  1886.         bra.s $20E
  1887.         move.l a6,d5
  1888.         lea $C00004,a5
  1889.         move.l #$940000,d4
  1890.         move d6,d4
  1891.         lsl.l #8,d4
  1892.         move #$9300,d4
  1893.         move.b d6,d4
  1894.         move.l d4,(a5)
  1895.         lsr.l #1,d5
  1896.         and.l #$7FFFFF,d5
  1897.         move.l #$960000,d4
  1898.         move d5,d4
  1899.         lsl.l #8,d4T        move.b d5,d4
  1900.         move.l d4,(a5)
  1901.         swap d5
  1902.         move #$9700,d4
  1903.         move.b d5,d4
  1904.         move d4,(a5)
  1905.         or #$80,d7
  1906.         swap d7
  1907.         move d7,(a5)
  1908.         swap d7
  1909.         move d7,-(a7)
  1910.         move (a7)+,(a5)
  1911.         rts
  1912.         move.l #$7C000002,$C00004
  1913.         move.l #$0,$C00000
  1914.         rts
  1915.         bsr $3BCC
  1916.         lea $FFFFC800.w,a6
  1917.         moveq #$0,d6
  1918.         move #$13F,d7
  1919.         move d6,(a6)+
  1920.         dbf d7,$282
  1921.         move.l #$78000002,d7
  1922.         move #$13F,d6
  1923.         bra $2B8
  1924.         move.l #$40000003,d7
  1925.         bra $2A6
  1926.         move.l #$60000003,d7
  1927.         move #$1FFF,d6
  1928.         bra $2B8
  1929.         move.l #$60000002,d7
  1930.         move #$DFF,d6
  1931.         moveq #$0,d5
  1932.         move #$8F01,$C00004
  1933.         lea $C00004,a5
  1934.         move.l #$940000,d4
  1935.         move d6,d4
  1936.         lsl.l #8,d4
  1937.         move #$9300,d4
  1938.         move.b d6,d4
  1939.         move.l d4,(a5)
  1940.         move #$9780,(a5)
  1941.         or.l #$40000080,d7
  1942.         move.l d7,(a5)
  1943.         move.b d5,$C00000
  1944.         move (a5),d4
  1945.         btst #$1,d4
  1946.         bne.s $2EC
  1947.         move #$8F02,(a5)
  1948.         rts
  1949.         move.l #$40000010,d7
  1950.         moveq #$28,d6
  1951.         moveq #$0,d5T        move d5,$C00000
  1952.         dbf d6,$30A
  1953.         rts
  1954.         lea $C00000,a5
  1955.         move.l #$800000,d3
  1956.         move.l d7,$C00004
  1957.         move d6,d2
  1958.         move (a6)+,(a5)
  1959.         dbf d2,$32A
  1960.         add.l d3,d7
  1961.         dbf d5,$322
  1962.         rts
  1963.         move d6,d2
  1964.         lea (a5),a4
  1965.         move d4,(a5)+
  1966.         addq #1,d4
  1967.         dbf d2,$33C
  1968.         lea $80(a4),a5
  1969.         dbf d5,$338
  1970.         rts
  1971.         bset #$6,$FFFFC127.w
  1972.         bra.s $36E
  1973.         move.l #$C0200000,$C00004
  1974.         move #$0,$C00000
  1975.         bclr #$6,$FFFFC127.w
  1976.         move $FFFFC126.w,$C00004
  1977.         rts
  1978.         bset #$0,$FFFFC15E.w
  1979.         moveq #$0,d0
  1980.         moveq #$0,d1
  1981.         move.b (a6)+,d0
  1982.         lea $FFFFC080.w,a1
  1983.         add d0,a1
  1984.         move.b (a6)+,d0
  1985.         move (a6)+,(a1)+
  1986.         dbf d0,$38C
  1987.         rts
  1988.         bclr #$0,$FFFFC15E.w
  1989.         beq.s $3CE
  1990.         btst #$6,$A10001
  1991.         beq.s $3AE
  1992.         move #$6EE,d0
  1993.         dbf d0,$3AA
  1994.         lea $C00004,a5
  1995.         move.l #$94009340,(a5)
  1996.         move.l #$96E09540,(a5)
  1997.         move #$977F,(a5)
  1998.         move #$C000,(a5)
  1999.         move #$80,-(a7)
  2000.         move (a7)+,(a5)
  2001.         rts
  2002.         moveq #$7,d1
  2003.         lea $FFFFC080.w,a6T        moveq #$E,d7
  2004.         move (a6),d4
  2005.         move d4,d2
  2006.         and d7,d2
  2007.         beq.s $3E4
  2008.         subq #2,d2
  2009.         asl #4,d7
  2010.         move d4,d3
  2011.         and d7,d3
  2012.         beq.s $3F0
  2013.         sub #$20,d3
  2014.         asl #4,d7
  2015.         and d7,d4
  2016.         beq.s $3FA
  2017.         sub #$200,d4
  2018.         or d2,d3
  2019.         or d3,d4
  2020.         move d4,(a6)+
  2021.         dbf d0,$3D8
  2022.         bset #$0,$FFFFC15E.w
  2023.         moveq #$7,d2
  2024.         moveq #$1,d0
  2025.         jsr $F80(pc)
  2026.         dbf d2,$40C
  2027.         dbf d1,$3D2
  2028.         rts
  2029.         moveq #$1F,d0
  2030.         lea $FFFFC080.w,a2
  2031.         lea -$80(a2),a1
  2032.         move.l (a2)+,(a1)+
  2033.         dbf d0,$426
  2034.         moveq #$1F,d0
  2035.         clr.l (a1)+
  2036.         dbf d0,$42E
  2037.         rts
  2038.         moveq #$E,d1
  2039.         lea $FFFFC080.w,a6
  2040.         lea -$80(a6),a1
  2041.         moveq #$3F,d0
  2042.         move d1,d5
  2043.         moveq #$E,d7
  2044.         move (a1)+,d4
  2045.         move d4,d2
  2046.         and d7,d2
  2047.         sub d5,d2
  2048.         bpl.s $452
  2049.         moveq #$0,d2
  2050.         asl #4,d7
  2051.         asl #4,d5
  2052.         move d4,d3
  2053.         and d7,d3
  2054.         sub d5,d3
  2055.         bpl.s $460T        asl #4,d7
  2056.         asl #4,d5
  2057.         and d7,d4
  2058.         sub d5,d4
  2059.         bpl.s $46C
  2060.         moveq #$0,d4
  2061.         or d2,d3
  2062.         or d3,d4
  2063.         move d4,(a6)+
  2064.         dbf d0,$442
  2065.         cmp #$8020,$FFFFC142.w
  2066.         bne.s $48E
  2067.         lea $FFFFC0A0.w,a2
  2068.         lea -$80(a2),a1
  2069.         moveq #$7,d0
  2070.         move.l (a1)+,(a2)+
  2071.         dbf d0,$488
  2072.         moveq #$7,d2
  2073.         bset #$0,$FFFFC15E.w
  2074.         jsr $F7E(pc)
  2075.         dbf d2,$496
  2076.         subq #2,d1
  2077.         bpl.s $438
  2078.         rts
  2079.  
  2080.  
  2081. ........
  2082.  
  2083.  
  2084.         move #$B4,$FFFFC150.w
  2085.         clr $FFFFC152.w
  2086.         moveq #-$79,d7
  2087.         jsr $748.w
  2088.         lea $16F8,a0
  2089.         jsr $14F4(pc)
  2090.         lea $1700,a0
  2091.         jsr $14F4(pc)
  2092.         lea $1296(pc),a6
  2093.         lea $FF03A0,a5
  2094.         jsr $197A
  2095.         lea $FF25A0,a5
  2096.         lea $1274(pc),a6
  2097.         bsr $19E8
  2098.         lea $FF359A,a5
  2099.         lea $127E(pc),a6
  2100.         bsr $19E8
  2101.         lea $FF37A2,a5
  2102.         lea $128E(pc),a6
  2103.         bra $19E8
  2104.         dc.b "GAME OVER",$0,"CONTINUE PLAY "
  2105.         dc.b "^",$0,"YES NO",$0,$0,"PLAYER 1",$0,$0,$0,$0,$0,$0
  2106.  
  2107. T        dc.b "NUS@@@@@@@@@@@@@@@",$0,"MISSI"
  2108.         dc.b "ON COMPLETED BONUS@@",$0,"MIN"
  2109.         dc.b "//SEC",$0,"OVER/////SEC///NO/"
  2110.         dc.b "BONUS",$0,"UNDER////SEC",$0,"PTS",$0,"P"
  2111.         dc.b "TS",$0,"PTS",$0,$0
  2112.         dc.b "INFILTRATE ENEMY LINES?",$0
  2113.         dc.b $12,"RESCUE SECRET AGENT?",$0,$0,$14
  2114.         dc.b "GO TO THE ARSENAL?",$0,$8,"BLOW"
  2115.         dc.b " UP ALL THE ENEMY WEAPON"
  2116.         dc.b "S?",$0,$10,"PENETRATE THE FORTRE"
  2117.         dc.b "SS?",$0,$E,"RESCUE COLONEL TRAU"
  2118.         dc.b "TMAN?",$0,$0,"PLAYER 1 START",$0,$0
  2119.  
  2120.